home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / comms / netsoftware / archie38_1.lha / archie-1.4 / make.com < prev    next >
Text File  |  1995-01-04  |  16KB  |  509 lines

  1. $! --- MAKE.COM ---                        !x='f$verify(0)'
  2. $! Description:
  3. $!  build the Archie client for VAX/VMS
  4. $!
  5. $! Written by Luke Brennan  <brennan@cchs.su.oz.AU>
  6. $!
  7. $! Modifications:
  8. $!    Date    Programmer    Reason for modification.
  9. $! 13-Oct-92       bpk        1.07 Add Japan and Taiwan servers.
  10. $! 10-Oct-92       ldcb        1.06 Add (Israel) archie server.
  11. $! 25-Sep-92       ldcb        1.05 Add (USA [NE]) archie server.
  12. $! 23-Sep-92       ldcb       1.04 Details... details..
  13. $!                                   cope with SUPPORT files being used...
  14. $!                                   You will need to enter your OWN stuff
  15. $!                                   into the CREATE_SUPPORT_OPTIONS gosub,
  16. $!                                   as I don't know what you're using!
  17. $! 22-Sep-92       ldcb         1.03 Oops! GCC now works correctly...
  18. $! 22-Sep-92       ldcb        1.02 Clean up a few tiny details.
  19. $! 22-Jan-92       ldcb        1.01 Fix some bugs (so I rushed..)
  20. $! 20-Jan-92       ldcb        1.00 Initial coding.
  21. $!
  22. $ make_version := 1.07
  23. $!
  24. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  25. $ Archie_EXECUTABLE := "archie.exe"
  26. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  27. $! add a new call here with the appropriate new Archie server host(s)
  28. $!
  29. $ arg == 1
  30. $ Call AddHost "archie.au"        "(Australia)"
  31. $ Call AddHost "archie.mcgill.ca"    "(Canada)"
  32. $ Call AddHost "archie.doc.ic.ac.uk"    "(Great Britain/Ireland)"
  33. $ Call AddHost "archie.funet.fi"    "(Finland/Mainland Europe)"
  34. $ Call AddHost "archie.cs.huji.ac.il"    "(Israel)
  35. $ Call AddHost "archie.wide.ad.jp"    "(Japan)"
  36. $ Call AddHost "archie.ncu.edu.tw"    "(Taiwan)"
  37. $ Call AddHost "archie.unl.edu"        "(USA [NE])"
  38. $ Call AddHost "archie.ans.net"        "(USA [NY])"
  39. $ Call AddHost "archie.rutgers.edu"    "(USA [NJ])"
  40. $ Call AddHost "archie.sura.net"    "(USA [MD])"
  41. $ MAXHOSTS = arg - 1
  42. $!
  43. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  44. $! add a new call here with any new source file(s)
  45. $! (P2 should be "SUPPORT" if intended for supporting an unknown TCPIP)
  46. $!
  47. $ arg == 1
  48. $ Call AddSource "AQUERY"
  49. $ Call AddSource "ARCHIE"
  50. $ Call AddSource "ATALLOC"
  51. $ Call AddSource "DIRSEND"
  52. $ Call AddSource "GET_PAUTH"
  53. $ Call AddSource "GET_VDIR"
  54. $ Call AddSource "PERRMESG"
  55. $ Call AddSource "PROCQUERY"
  56. $ Call AddSource "PTALLOC"
  57. $ Call AddSource "REGEX"
  58. $ Call AddSource "STCOPY"
  59. $ Call AddSource "SUPPORT"
  60. $ Call AddSource "VLALLOC"
  61. $ Call AddSource "VL_COMP"
  62. $ Call AddSource "VMS_SUPPORT" "SUPPORT"
  63. $ MAXSOURCEFILES = arg - 1
  64. $!
  65. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  66. $! add a call here with any supported TCP/IP implementations
  67. $!  P1 = name of TCP/IP product, P2 = cc/define to set,
  68. $!  P3 = logical to look for,    P4 = location of link/OPT,
  69. $!  P5 = MINIMUM VERSION of TCP/IP to support
  70. $!
  71. $!  Multinet should be last, as it can 'fake' a UCX if you want it to, so
  72. $!  UCX would come up as the 'real' net even though Multinet is used.
  73. $!
  74. $ arg == 1
  75. $ Call AddTCPIP "UCX"        "UCX"         "UCX$DEVICE" "[.vms]ucx.opt"
  76. $ Call AddTCPIP "WOLLONGONG" "WOLLONGONG"  "TWG$TCP"    "[.vms]woll.opt"
  77. $ Call AddTCPIP "MULTINET"   "MULTINET_30" "MULTINET"   "[.vms]multi.opt" "V3.0"
  78. $ MAXTCPIPTYPES = arg - 1
  79. $!
  80. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  81. $!
  82. $ YES = (1.eq.1)
  83. $ NO  = (1.eq.0)
  84. $!
  85. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  86. $!
  87. $ GoSub get_command_line_args
  88. $ GoSub check_for_GNU_cc        ! use GNU if it's available..
  89. $ GoSub check_which_TCPIP
  90. $ GoSub ask_nearest_ARCHIE_HOST
  91. $ GoSub check_for_strings_H
  92. $ GoSub set_cc_defines
  93. $ GoSub do_compiles
  94. $ If (LINKAGE_REQUIRED)
  95. $ Then GoSub do_link
  96. $ Else Write Sys$OutPut "ARCHIE is up to date."
  97. $ EndIF
  98. $ Exit
  99. $!
  100. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  101. $!
  102. $get_command_line_args:
  103. $ cmdline = P1 + P2 + P3 + P4 + P5 + P6 + P7 + P8
  104. $ If ((f$locate("DEBUG",cmdline) .ne. f$length(cmdline)) -
  105.  .or. (f$locate("DBG",cmdline)   .ne. f$length(cmdline)))
  106. $ Then debug := "/DeBug"
  107. $ Else debug := "/NOdebug"
  108. $ EndIF
  109. $ If (f$locate("FORCE",cmdline) .ne. f$length(cmdline))
  110. $ Then FORCEBUILD = YES
  111. $ Else FORCEBUILD = NO
  112. $ EndIF
  113. $ If (f$locate("LINK",cmdline) .ne. f$length(cmdline))
  114. $ Then FORCELINK = YES
  115. $ Else FORCELINK = NO
  116. $ EndIF
  117. $ If ((f$locate("?",cmdline) .ne. f$length(cmdline)) -
  118.  .or. (f$locate("H",cmdline) .ne. f$length(cmdline)))
  119. $ Then
  120. $   Write Sys$Output "Usage:"
  121. $   Write Sys$OutPut "     @MAKE [<debug>|<force>|<link>|<help>]
  122. $   EXIT
  123. $ EndIF
  124. $ RETURN
  125. $!
  126. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  127. $!
  128. $CHECK_FOR_GNU_CC:
  129. $ If (f$trnlnm("GNU_CC") .nes. "")
  130. $ Then
  131. $   cc := "GCC/Optimize/Include=([])"
  132. $   gnu_cc = YES
  133. $ Else
  134. $   cc := "CC/Optimize=NOinline/Include=([])"
  135. $   gnu_cc = NO
  136. $ EndIF
  137. $!
  138. $ RETURN
  139. $!
  140. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  141. $! for product P1, cc/define=P2 if logical P3 present on system.
  142. $! Libs/option = P4 if present. ALL get disregarded if less than version P5
  143. $!
  144. $CHECK_WHICH_TCPIP:
  145. $ tcpip_flag :=
  146. $ tcpip_libs :=
  147. $ NO_TCPIP_SUPPORT = YES
  148. $ i = 1
  149. $tcp_loop:
  150. $ If (i .gt. MAXTCPIPTYPES) Then GoTo tcp_check_done
  151. $ If (f$type(tcpip_P2_'i') .eqs. "") Then GoTo tcp_check_done
  152. $ If (f$type(tcpip_P3_'i') .nes. "")
  153. $ Then
  154. $   tcpip_logical = tcpip_P3_'i'
  155. $   If (tcpip_logical .nes. "")
  156. $   Then                    ! logical to look for
  157. $     If (f$logical(tcpip_logical) .nes. "")
  158. $     Then
  159. $       tcpip_flag = tcpip_P2_'i'
  160. $       tcpip_flag = f$fao(",!AS=1",tcpip_flag)
  161. $       NO_TCPIP_SUPPORT = NO
  162. $       If (f$type(tcpip_P4_'i') .nes. "")
  163. $       Then                    ! link/OPT file location
  164. $        tcpip_linkOPTs = tcpip_P4_'i'
  165. $         If (tcpip_linkOPTs .nes. "")
  166. $         Then
  167. $           If (f$search(tcpip_linkOPTs) .nes. "")
  168. $           Then
  169. $             tcpip_libs = tcpip_P4_'i'
  170. $             tcpip_libs = f$fao("!AS/Option",tcpip_libs)
  171. $           EndIF
  172. $         EndIF
  173. $       EndIF
  174. $       If (f$type(tcpip_P5_'i') .nes. "")
  175. $       Then                    ! minimum version specified
  176. $         If (tcpip_P5_'i' .nes. "")
  177. $         Then
  178. $           GoSub CheckIfVersionOK
  179. $           If VERSION_TOO_EARLY
  180. $           Then                ! too early.. use SUPPORT files
  181. $             tcpip_flag :=
  182. $             tcpip_libs :=
  183. $             NO_TCPIP_SUPPORT = YES
  184. $          tcp_ver = tcpip_P5_'i'
  185. $             tcp_name = tcpip_P1_'i'
  186. $             Write Sys$OutPut f$fao( -
  187.            "Your version of !AS is earlier than !AS.",tcp_name,tcp_ver)
  188.           Write Sys$OutPut "MAKE will use STD support files instead."
  189. $          If (f$mode() .eqs. "INTERACTIVE")
  190. $          Then
  191. $            Read/Prompt="enter <CR> to continue" SYS$COMMAND dummy
  192. $          EndIF
  193. $           EndIF
  194. $         EndIF
  195. $       EndIF
  196. $     EndIF
  197. $   EndIF
  198. $ EndIF
  199. $ i = i + 1
  200. $ Goto tcp_loop
  201. $tcp_check_done:
  202. $ RETURN
  203. $!
  204. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  205. $!
  206. $ASK_NEAREST_ARCHIE_HOST:
  207. $GoSub CLRSCN
  208. $ Write Sys$OutPut f$fao("archie make V!AS!/!/!AS!/!/", -
  209.     make_version, -
  210.     "           Enter the number of the ARCHIE HOST nearest you.")
  211. $!
  212. $ i = 1
  213. $_display_loop:
  214. $ If (i .gt. MAXHOSTS) Then GoTo _display_done
  215. $  Write Sys$OutPut f$fao("!2SL) !25AS  !AS",i,host_P1_'i',host_P2_'i')
  216. $  i = i + 1
  217. $ GoTo _display_loop
  218. $_display_done:
  219. $!
  220. $ If (f$mode() .eqs. "INTERACTIVE")
  221. $ Then
  222. $   Assign/User_Mode/NOlog Sys$Command Sys$InPut
  223. $_select_loop:                ! get their selection
  224. $   selection = 99
  225. $   Read     Sys$Command selection    -
  226.         /End=_selection_made    -
  227.         /Prompt="Enter number of your selection: "
  228. $_selection_made:
  229. $   If (selection .gt. MAXHOSTS)
  230. $   Then
  231. $     Write Sys$Error f$fao("!AS !2SL", "error: Options only go to", MAXHOSTS)
  232. $     GoTo _select_loop
  233. $   EndIF
  234. $   ascii_string = f$edit(selection,"COLLAPSE,UPCASE")
  235. $   ascii_char = f$extract(0,1,ascii_string)
  236. $   If (ascii_char .eqs. "Q") Then EXIT
  237. $   If (f$length(ascii_string) .eq. 1) Then ascii_string = "0" + ascii_string
  238. $   If .NOT. (("00".lts.ascii_string) .and. (ascii_string.les."''MAXHOSTS'"))
  239. $   Then
  240. $     Write Sys$Error -
  241.         f$fao("error: Enter option NUMBER (up to !2SL)", MAXHOSTS)
  242. $     Goto _select_loop
  243. $   EndIF
  244. $ Else            ! BATCH can't be queried - assume selection 1
  245. $   selection = 1
  246. $ EndIF
  247. $!
  248. $ local_archie = host_P1_'selection'
  249. $!
  250. $ RETURN
  251. $!
  252. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  253. $! If we're using VAXC then we need to grab STRINGS.H from SYS$LIBRARY.
  254. $CHECK_FOR_STRINGS_H:
  255. $ delete := delete
  256. $ copy   := copy
  257. $ If (f$search("strings.h") .nes. "") Then delete/nolog/noconfirm []strings.h;*
  258. $ If .NOT. (GNU_CC) Then copy/noconfirm sys$library:string.h []strings.h
  259. $!
  260. $ RETURN
  261. $!
  262. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  263. $! **NOTE** use of global symbol!!!
  264. $! **NOTE** this is the only way I could pass it to the compile subroutine
  265. $! **NOTE** without DCL and/or CC stripping off too many layers of quotes..
  266. $! **NOTE** yeah.. I know.. It's ugly...  you work it out!! :-)
  267. $SET_CC_DEFINES:
  268. $ archie_host = " """"""ARCHIE_HOST=""""""""''local_archie'"""""""" """""" "
  269. $ cflags :== /define=(debug=1,funcs=1,noregex=1'tcpip_flag','archie_host')
  270. $!
  271. $RETURN
  272. $!
  273. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  274. $!
  275. $DO_COMPILES:
  276. $ GoSub CLRSCN
  277. $ LINKAGE_REQUIRED == NO
  278. $ If ("''f$type(Archie_EXECUTABLE)'" .nes. "")
  279. $ Then
  280. $   If (Archie_EXECUTABLE .nes. "")
  281. $   Then If (f$search(Archie_EXECUTABLE) .eqs. "") Then LINKAGE_REQUIRED == YES
  282. $   Else If (f$search("Archie.exe") .eqs. "") Then LINKAGE_REQUIRED == YES
  283. $   EndIF
  284. $ Else
  285. $   If (f$search("Archie.exe") .nes. "") Then LINKAGE_REQUIRED == YES
  286. $ EndIF
  287. $ i = 1
  288. $cc_loop:
  289. $ If (i .gt. MAXSOURCEFILES) Then GoTo cc_done
  290. $ source_file = source_P1_'i'
  291. $ If ((f$type(source_P2_'i') .eqs. "") .or. (source_P2_'i' .eqs. ""))
  292. $ Then Call Compile "''cc'" "''source_file'" "''debug'" 'FORCEBUILD'
  293. $ Else
  294. $   If ((NO_TCPIP_SUPPORT) .and. (source_P2_'i' .eqs. "SUPPORT"))
  295. $   Then Call Compile "''cc'" "''source_file'" "''debug'" 'FORCEBUILD'
  296. $   EndIF
  297. $ EndIF
  298. $ i = i + 1
  299. $ GoTo cc_loop
  300. $cc_done:
  301. $ If (FORCELINK) Then LINKAGE_REQUIRED == YES
  302. $!
  303. $ RETURN
  304. $!
  305. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  306. $!
  307. $DO_LINK:
  308. $ If (f$type(Archie_EXECUTABLE) .nes. "")
  309. $ Then
  310. $   If (Archie_EXECUTABLE .nes. "")
  311. $   Then executable := /Exec='Archie_EXECUTABLE'
  312. $   Else executable := /Exec=Archie.exe
  313. $   EndIF
  314. $ Else
  315. $   executable := /Exec=Archie.exe
  316. $ EndIF
  317. $ i = 1
  318. $ object_files :=
  319. $object_files_loop:
  320. $ If (i .gt. MAXSOURCEFILES) Then GoTo object_files_done
  321. $ object_file = source_P1_'i'
  322. $ If ((f$type(source_P2_'i') .eqs. "") .or. (source_P2_'i' .eqs. ""))
  323. $ Then object_files := 'object_files'+'object_file'
  324. $ Else
  325. $   If ((NO_TCPIP_SUPPORT) .and. (source_P2_'i' .eqs. "SUPPORT"))
  326. $   Then object_files := 'object_files'+'object_file'
  327. $   EndIF
  328. $ EndIF
  329. $ i = i + 1
  330. $ GoTo object_files_loop
  331. $object_files_done:
  332. $ If (f$extract(0,1,object_files) .eqs. "+")
  333. $ Then object_files = f$extract(1,f$length(object_files),object_files)
  334. $ EndIF
  335. $!
  336. $ If (gnu_cc)
  337. $ Then
  338. $   If (tcpip_libs .nes. "")
  339. $   Then tcpip_libs = tcpip_libs + ",GNU_CC:[000000]GCCLIB/Library"
  340. $   Else tcpip_libs = "GNU_CC:[000000]GCCLIB/Library"
  341. $   EndIF
  342. $ EndIF
  343. $!
  344. $ If (NO_TCPIP_SUPPORT)
  345. $ Then
  346. $   dev=f$TrnLnm("SYS$DISK")
  347. $   If (f$search("NO_SUPPORT.OPT") .eqs. "") Then GoSub Create_Support_Options
  348. $   If (tcpip_libs .nes. "")
  349. $   Then tcpip_libs = tcpip_libs + ",'dev'[]No_Support.opt/OPTION"
  350. $   Else tcpip_libs = "'dev'[]No_Support.opt/OPTION"
  351. $   EndIF
  352. $ EndIF
  353. $!
  354. $ If (tcpip_libs .nes. "")
  355. $ Then object_files = object_files + ","
  356. $ EndIF
  357. $!
  358. $ Set Verify
  359. $ Link'debug''executable' 'object_files''tcpip_libs'
  360. $ x='f$verify(0)'
  361. $!
  362. $ here =f$environment("procedure") ! assume .EXE is in same directory as MAKE.
  363. $ here = f$parse(here,,,"DEVICE") + f$parse(here,,,"DIRECTORY")
  364. $!
  365. $ Write Sys$OutPut " "
  366. $ Write Sys$OutPut " "
  367. $ Write Sys$OutPut "Done! Define the symbol ARCHIE & fire away."
  368. $ Write Sys$OutPut "e.g."
  369. $ Write Sys$OutPut f$fao("  $ archie :== $!AS!AS",here,archie_executable)
  370. $ Write Sys$OutPut "  $ archie GOPHER"
  371. $!
  372. $ RETURN
  373. $!
  374. $! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  375. $!
  376. $CLRSCN:
  377. $If (f$GetDVI("TT:","TT_ANSICRT"))            ! ANSI compatible?
  378. $Then
  379. $  CSI = "x["
  380. $  CSI[0,8] = 27
  381. $  CLS = CSI + "H" + CSI +"2J"
  382. $  Write Sys$OutPut CLS
  383. $Else                    ! otherwise pump out some <CR>s..
  384. $  lines=f$GetDVI("TT:","TT_PAGE")
  385. $  Write Sys$Output f$fao("!''lines'(/)")
  386. $EndIF
  387. $Return
  388. $!
  389. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  390. $!
  391. $AddHOST: SUBROUTINE
  392. $ host_P1_'arg' :== "''P1'"
  393. $ host_P2_'arg' :== "''P2'"
  394. $ arg == arg + 1    ! *NOTE* global symbols used...
  395. $ENDSUBROUTINE
  396. $!
  397. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  398. $!
  399. $AddSOURCE: SUBROUTINE
  400. $ source_P1_'arg' :== "''P1'"
  401. $ source_P2_'arg' :== "''P2'"
  402. $ arg == arg + 1    ! *NOTE* global symbols used...
  403. $ENDSUBROUTINE
  404. $!
  405. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  406. $!
  407. $AddTCPIP: SUBROUTINE
  408. $ tcpip_P1_'arg' :== "''P1'"
  409. $ tcpip_P2_'arg' :== "''P2'"
  410. $ tcpip_P3_'arg' :== "''P3'"
  411. $ tcpip_P4_'arg' :== "''P4'"
  412. $ tcpip_P5_'arg' :== "''P5'"
  413. $ arg == arg + 1    ! *NOTE* global symbols used...
  414. $ENDSUBROUTINE
  415. $!
  416. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  417. $! **NOTE** cflags is a GLOBAL symbol due to problems with quoted /Defines
  418. $! **NOTE** not passing down correctly.. (I gave up!)
  419. $Compile: SUBROUTINE
  420. $ YES = (1.eq.1)
  421. $! --- do a Make of only that source which has been modified since its
  422. $!     object code was generated or that is missing its object code.
  423. $ cc       = "''P1'"
  424. $ source   = "''P2'"
  425. $ dbg      = "''P3'"
  426. $ FORCED   = P4
  427. $!
  428. $source = source - ".C" + ".C"
  429. $ t1 = f$search("''source'")                ! source exists?
  430. $  If (t1 .eqs. "") Then GoTo _error_source_missing    ! YIPE!
  431. $   source = source - ".C"
  432. $    if (FORCED) Then GoTo _compile_the_source        ! forced to compile
  433. $     t1 = f$search("''source'.OBJ")            ! object exist?
  434. $     If (t1 .eqs. "") Then GoTo _compile_the_source    ! object missing
  435. $     t1 = f$file_attributes("''source'.OBJ","RDT")    ! when was the OBJECT
  436. $    t1 = f$cvtime(t1)                    ! produced? (rev date)
  437. $   t2 = f$file_attributes("''source'.C","RDT")        ! when was source last
  438. $  t2 = f$cvtime(t2)                    ! modified?
  439. $ If (t1 .ges. t2) Then GoTo _bypass_compile        ! object still current
  440. $_compile_the_source:
  441. $ set verify
  442. $ 'cc -
  443.   'cflags -
  444.   'dbg 'source
  445. $ x='f$verify(0)'
  446. $ LINKAGE_REQUIRED == YES
  447. $  GoTo _cc_done
  448. $_bypass_compile:                    ! didn't need to
  449. $  GoTo _cc_done                    ! generate new OBJ file
  450. $_error_source_missing:
  451. $ Write Sys$Error "ERROR: unable to locate source file ''source'"
  452. $_cc_done:
  453. $ENDSUBROUTINE
  454. $!
  455. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  456. $!
  457. $CHECKIFVERSIONOK:
  458. $ required_version = tcpip_P5_'i'
  459. $ tcpip_type = tcpip_P1_'i'
  460. $ If ("MULTINET" .eqs. tcpip_type)
  461. $ Then                        ! I know how to check MULTINET
  462. $   If (f$search("MULTINET:MULTINET_VERSION.;") .nes. "")
  463. $   Then
  464. $     Open/share=READ fd MULTINET:MULTINET_VERSION.;
  465. $     Read fd buffer
  466. $     Close fd
  467. $     v = buffer - "VERSION"
  468. $     v = f$edit(v,"TRIM,COMPRESS")
  469. $     If (v .ges. required_version)
  470. $     Then VERSION_TOO_EARLY = NO
  471. $     Else VERSION_TOO_EARLY = YES
  472. $     EndIF
  473. $   Else
  474. $     VERSION_TOO_EARLY = YES
  475. $   EndIF
  476. $ Else                        ! don't know, so assume current
  477. $   VERSION_TOO_EARLY = NO
  478. $ EndIF
  479. $!
  480. $ RETURN
  481. $!
  482. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  483. $!
  484. $CREATE_SUPPORT_OPTIONS:
  485. $ Open/Write fd No_Support.OPT
  486. $ Write fd "! --- No_Support.OPT ---"
  487. $ Write fd "!"
  488. $ Write fd "! provides the VaxCrtl linkage for the client that has no"
  489. $ Write fd "! known supported TCP/IP implementation."
  490. $ Write fd "!"
  491. $ Write fd "Sys$Share:VaxCrtl.exe/Share"
  492. $ Write fd "!"
  493. $ Write fd "! You will have to add in your specific TCP/IP libraries here."
  494. $!
  495. $! Early MULTINETs would look something like this... (I don't remember!)
  496. $! I assume CMUTEK would need something along these lines too...
  497. $!
  498. $! If (F$TrnLnm("MULTINET") .nes. "")
  499. $! Then
  500. $!   Write fd "Multinet:Multinet_Socket_Library.exe/Share
  501. $! EndIF
  502. $!
  503. $ Write fd "!"
  504. $ Close fd
  505. $!
  506. $ RETURN
  507. $!
  508. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  509.